﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Objects
{
    [Table("Route")]
    public class Route
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [InverseProperty("Id")]
        [ForeignKey("FK_STARTPOINTCITY")]
        public virtual City StartpointId { get; set; }

        [InverseProperty("Id")]
        [ForeignKey("FK_ENDPOINTCITY")]
        public virtual City EndpointId { get; set; }

        [InverseProperty("Id")]
        [ForeignKey("FK_MERCHANTID_ROUTE")]
        public virtual Bus Buses { get; set; }

        public int Rating { get; set; }

        public virtual IEnumerable<Comment> Comments { get; set; }
        
    }
}
